Prepare affected-test selection rollout - #10450
Conversation
There was a problem hiding this comment.
Pull request overview
Prepares an intentionally disabled rollout of affected-test selection for Microsoft.Testing.Platform CI.
Changes:
- Adds affected-test scopes and gated pipeline modes.
- Adds rollout validation and safety checks.
- Documents activation, storage, validation, and rollback.
Show a summary per file
| File | Description |
|---|---|
global.json |
Defines affected-test scopes. |
azure-pipelines.yml |
Configures disabled collect/run call sites and validation. |
eng/pipelines/steps/test-windows-debug-coverage.yml |
Adds gated affected-test commands. |
eng/validate-affected-tests.ps1 |
Validates rollout configuration. |
docs/affected-test-selection.md |
Documents rollout procedures. |
docs/README.md |
Links the new guide. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 3
- Review effort level: Balanced
Use the public SDK build containing affected-test commands and prepare a credential-free Azure Pipelines Cache transport with safe full-test and coverage fallbacks. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3baa2cd4-db32-4f9f-b6b7-8cc190f3799f
02ca8e7 to
0def8c9
Compare
There was a problem hiding this comment.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Note
This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.
Keep the stable SDK pin until a daily containing the TransactionalAction fix is published, and enforce that corrected SDK only when rollout activation is enabled. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3baa2cd4-db32-4f9f-b6b7-8cc190f3799f
🔍 Build Failure AnalysisSummary — Every build leg except one Windows Release leg failed identically at Root cause: newly-pinned SDK
|
| Code | Project | File:Line | Message |
|---|---|---|---|
MSB3073 |
Tools.proj |
Tools.proj:29 (RestoreRepoTools/Exec) |
The command "...dotnet(.exe) tool restore " exited with code 1 |
| — | Build.proj |
— | Build failed. (cascades from Tools.proj) |
Legs affected: 1_0 (Linux Debug), 2_0 (Linux Release), 3_1/3_2 (Windows Release, 2 of 3), 4_0/4_1/4_2 (Windows Debug, all 3), 5_0 (Darwin Release), 6_0 (Darwin Debug).
Leg with no error reported: 3_0 (Windows Release).
🤖 Generated by the Build Failure Analysis workflow using binlog-mcp · commit 0def8c9
🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · auto · 83.1 AIC · ⌖ 2.07 AIC · ⊞ 11.4K · [◷]( · ◷)
There was a problem hiding this comment.
🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · auto · 83.1 AIC · ⌖ 2.07 AIC · ⊞ 11.4K · ◷
Comments that could not be inline-anchored
global.json:5
🔧 MSB3073 — This SDK build (11.0.100-rc.1.26406.108) crashes with an unhandled NullReferenceException inside Microsoft.DotNet.Cli.TransactionalAction's static constructor whenever dotnet tool restore runs, failing RestoreRepoTools on 8 of 10 CI legs. Revert to the previously-working pin until a fixed 11.0.100-rc.1.* servicing build is confirmed available.
"dotnet": "11.0.100-rc.1.26402.102",
global.json:28
🔧 MSB3073 — Same SDK pin; the sdk.version entry must match tools.dotnet above. Revert both together to restore a working dotnet tool restore.
"version": "11.0.100-rc.1.26402.102",
There was a problem hiding this comment.
Review details
Suppressed comments (1)
global.json:57
- The force-all scope covers only the root and direct
test/Directory.Build files. This repository also hassrc/Directory.Build.props,src/Platform/Directory.Build.props,src/Platform/Directory.Build.targets, andtest/IntegrationTests/TestAssets/Directory.Build.targets; changes to these files alter project evaluation but will not match the configured force-all patterns. Include recursivesrcandtestDirectory.Build patterns so an old map cannot be used for these build-wide changes.
"Directory.Build.*",
- Files reviewed: 6/6 changed files
- Comments generated: 1
- Review effort level: Balanced
Keep exit code 2 from selected-test runs and force full selection when nested Directory.Build files change. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3baa2cd4-db32-4f9f-b6b7-8cc190f3799f
Keep exit code 8 from affected-test runs so the full-suite fallback cannot mask the SDK's all-skipped safeguard. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3baa2cd4-db32-4f9f-b6b7-8cc190f3799f
Require the global.json SDK pins to match and gate activation on the tools.dotnet version installed by CI. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3baa2cd4-db32-4f9f-b6b7-8cc190f3799f
There was a problem hiding this comment.
Review details
Suppressed comments (1)
azure-pipelines.yml:722
- The Windows job that reaches this
runcall checks out the repository at lines 415-416 without afetchDepth, unlikeDetectChanges. Affected-test selection derives the changed source set from Git, so a shallow Azure PR checkout can omit the merge parents and make--affected-testsunable to compute the PR diff, forcing the full-suite fallback on every run. Make this lane deterministic by usingfetchDepth: 0on that checkout (or explicitly fetching the target history) before enabling the switch.
- template: /eng/pipelines/steps/test-windows-debug-coverage.yml
parameters:
# Enable only after the prerequisites in docs/affected-test-selection.md are satisfied.
enableAffectedTests: false
affectedTestsMode: run
- Files reviewed: 6/6 changed files
- Comments generated: 0 new
- Review effort level: Balanced
Summary
Prepares testfx to adopt the experimental Microsoft.Testing.Platform affected-test workflow from dotnet/sdk#55574, using the composable filter-provider support already merged in testfx#10235.
The rollout remains intentionally disabled until a usable SDK and the public affected-test extension package with its local-filesystem storage schema are available. Existing test runs therefore keep their current command and behavior.
Prepared now
test.affectedTestschange and instrumentation scopes toglobal.json;Cache@2, without Blob credentials;enableAffectedTests: false;SDK status
SDK
11.0.100-rc.1.26406.108contains--collect-test-mapand--affected-tests, but it failsdotnet tool restoreon clean agents due to theTransactionalActionregression fixed by dotnet/sdk#55595. The repository therefore retains stable SDK11.0.100-rc.1.26402.102.Activation validation requires an SDK newer than
11.0.100-rc.1.26406.108. The first candidate must passdotnet tool restoreon a clean agent before the rollout switches are enabled.Storage and safety
The future extension storage path is
$(Pipeline.Workspace)\affected-test-map. Cache keys include a manual compatibility version, OS, architecture, configuration, and unique build ID. Prefix restore selects the newest compatible main map.Pipeline caches expire after seven days without activity, so cache miss is an expected state and always runs the unchanged full test command. The one-switch rollback remains setting
enableAffectedTeststofalse; dormant storage configuration is permitted.Remaining activation gates
11.0.100-rc.1.26406.108.storageschema.After that, enable
collect, validate the map, then enablerun.Validation
global.jsonand modified YAML parse successfully.git diff --checkpass.